var express = require('express');
var fs = require('fs');
var router = require('./router');
var bodyparser = require('body-parser');


var app = express();

app.use('/node_modules/', express.static('../node_modules/'));
app.use('/public/', express.static('../public/'));

app.use(bodyparser.urlencoded({extended:false}));//post请求的中间件处理
app.use(bodyparser.json());

app.set('views', '../views'); //手动声明所读取的页面路径

app.engine('html', require('express-art-template'));

app.use(router);

app.listen(80, function () {
    console.log('running at http://127.0.0.1:80/students')
})